<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class image_sampler</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Compute">
<link rel="up" href="../../boost_compute/reference.html#header.boost.compute.image.image_sampler_hpp" title="Header &lt;boost/compute/image/image_sampler.hpp&gt;">
<link rel="prev" href="image_object.html" title="Class image_object">
<link rel="next" href="opengl_e_idm45822165679520.html" title="Function opengl_enqueue_acquire_gl_objects">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="image_object.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.image.image_sampler_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opengl_e_idm45822165679520.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.compute.image_sampler"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class image_sampler</span></h2>
<p>boost::compute::image_sampler — An OpenCL image sampler object. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_compute/reference.html#header.boost.compute.image.image_sampler_hpp" title="Header &lt;boost/compute/image/image_sampler.hpp&gt;">boost/compute/image/image_sampler.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="keyword">enum</span> <a name="boost.compute.image_sampler.addressing_mode"></a>addressing_mode <span class="special">{</span> none = = CL_ADDRESS_NONE, 
                         clamp_to_edge = = CL_ADDRESS_CLAMP_TO_EDGE, 
                         clamp = = CL_ADDRESS_CLAMP, 
                         repeat = = CL_ADDRESS_REPEAT <span class="special">}</span><span class="special">;</span>

  <span class="keyword">enum</span> <a name="boost.compute.image_sampler.filter_mode"></a>filter_mode <span class="special">{</span> nearest = = CL_FILTER_NEAREST, 
                     linear = = CL_FILTER_LINEAR <span class="special">}</span><span class="special">;</span>
  <span class="comment">// <a class="link" href="image_sampler.html#boost.compute.image_samplerconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="image_sampler.html#idm45822165697264-bb"><span class="identifier">image_sampler</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="image_sampler.html#idm45822165696976-bb"><span class="identifier">image_sampler</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">context</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="identifier">cl_addressing_mode</span><span class="special">,</span> <span class="identifier">cl_filter_mode</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="image_sampler.html#idm45822165693936-bb"><span class="identifier">image_sampler</span></a><span class="special">(</span><span class="identifier">cl_sampler</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="image_sampler.html#idm45822165691712-bb"><span class="identifier">image_sampler</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="image_sampler.html#idm45822165686320-bb"><span class="identifier">image_sampler</span></a><span class="special">(</span><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> <a class="link" href="image_sampler.html#idm45822165689520-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> <a class="link" href="image_sampler.html#idm45822165684784-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="image_sampler.html#idm45822165682672-bb"><span class="special">~</span><span class="identifier">image_sampler</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="image_sampler.html#idm45822165716416-bb">public member functions</a></span>
  <span class="identifier">cl_sampler</span> <span class="special">&amp;</span> <a class="link" href="image_sampler.html#idm45822165715856-bb"><span class="identifier">get</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">context</span> <a class="link" href="image_sampler.html#idm45822165714000-bb"><span class="identifier">get_context</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">T</span> <a class="link" href="image_sampler.html#idm45822165712560-bb"><span class="identifier">get_info</span></a><span class="special">(</span><span class="identifier">cl_sampler_info</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> Enum<span class="special">&gt;</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a class="link" href="image_sampler.html#idm45822165708384-bb"><span class="identifier">get_info</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="image_sampler.html#idm45822165705456-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="image_sampler.html#idm45822165702000-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <a class="link" href="image_sampler.html#idm45822165698544-bb"><span class="keyword">operator</span> <span class="identifier">cl_sampler</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm46604974718464"></a><h2>Description</h2>
<p><span class="bold"><strong>See Also:</strong></span></p>
<p><a class="link" href="image2d.html" title="Class image2d">image2d</a>, <a class="link" href="image_format.html" title="Class image_format">image_format</a> </p>
<p>
</p>
<p>
</p>
<div class="refsect2">
<a name="idm46604974715168"></a><h3>
<a name="boost.compute.image_samplerconstruct-copy-destruct"></a><code class="computeroutput">image_sampler</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="idm45822165697264-bb"></a><span class="identifier">image_sampler</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a name="idm45822165696976-bb"></a><span class="identifier">image_sampler</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">context</span> <span class="special">&amp;</span> context<span class="special">,</span> <span class="keyword">bool</span> normalized_coords<span class="special">,</span> 
              <span class="identifier">cl_addressing_mode</span> addressing_mode<span class="special">,</span> <span class="identifier">cl_filter_mode</span> filter_mode<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">explicit</span> <a name="idm45822165693936-bb"></a><span class="identifier">image_sampler</span><span class="special">(</span><span class="identifier">cl_sampler</span> sampler<span class="special">,</span> <span class="keyword">bool</span> retain <span class="special">=</span> <span class="keyword">true</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a name="idm45822165691712-bb"></a><span class="identifier">image_sampler</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> other<span class="special">)</span><span class="special">;</span></pre>Creates a new image sampler object as a copy of <code class="computeroutput">other</code>. </li>
<li class="listitem"><pre class="literallayout"><a name="idm45822165686320-bb"></a><span class="identifier">image_sampler</span><span class="special">(</span><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;&amp;</span> other<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> <a name="idm45822165689520-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> other<span class="special">)</span><span class="special">;</span></pre>Copies the image sampler object from <code class="computeroutput">other</code> to <code class="computeroutput">*this</code>. </li>
<li class="listitem"><pre class="literallayout"><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> <a name="idm45822165684784-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;&amp;</span> other<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a name="idm45822165682672-bb"></a><span class="special">~</span><span class="identifier">image_sampler</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Destroys the image sampler object. </li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm46604974657536"></a><h3>
<a name="idm45822165716416-bb"></a><code class="computeroutput">image_sampler</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">cl_sampler</span> <span class="special">&amp;</span> <a name="idm45822165715856-bb"></a><span class="identifier">get</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns the underlying <code class="computeroutput">cl_sampler</code> object. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">context</span> <a name="idm45822165714000-bb"></a><span class="identifier">get_context</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns the context for the image sampler object. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">T</span> <a name="idm45822165712560-bb"></a><span class="identifier">get_info</span><span class="special">(</span><span class="identifier">cl_sampler_info</span> info<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Returns information about the sampler.</p>
<p>See the documentation for <a href="http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetSamplerInfo.html" target="_top">clGetSamplerInfo()</a> for more information. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> Enum<span class="special">&gt;</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="idm45822165708384-bb"></a><span class="identifier">get_info</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="idm45822165705456-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> other<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns <code class="computeroutput">true</code> if the sampler is the same at <code class="computeroutput">other</code>. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="idm45822165702000-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="image_sampler.html" title="Class image_sampler">image_sampler</a> <span class="special">&amp;</span> other<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns <code class="computeroutput">true</code> if the sampler is different from <code class="computeroutput">other</code>. </li>
<li class="listitem"><pre class="literallayout"><a name="idm45822165698544-bb"></a><span class="keyword">operator</span> <span class="identifier">cl_sampler</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2013, 2014 Kyle Lutz<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="image_object.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.image.image_sampler_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opengl_e_idm45822165679520.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
